home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / include / cc_macro.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  2.1 KB  |  70 lines

  1. #ifndef _CC_MACRO_H_
  2. #define _CC_MACRO_H_
  3. /*
  4.  *   $RCSfile: cc_macro.h,v $  
  5.  *   $Revision: 1.1.1.1 $  
  6.  *   $Date: 1996/05/04 21:55:07 $      
  7.  */ 
  8. /**********************************************************************
  9. * EXODUS Database Toolkit Software
  10. * Copyright (c) 1991 Computer Sciences Department, University of
  11. *                    Wisconsin -- Madison
  12. * All Rights Reserved.
  13. *
  14. * Permission to use, copy, modify and distribute this software and its
  15. * documentation is hereby granted, provided that both the copyright
  16. * notice and this permission notice appear in all copies of the
  17. * software, derivative works or modified versions, and any portions
  18. * thereof, and that both notices appear in supporting documentation.
  19. *
  20. * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
  21. * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.  
  22. * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  23. * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  24. *
  25. * The EXODUS Project Group requests users of this software to return 
  26. * any improvements or extensions that they make to:
  27. *
  28. *   EXODUS Project Group 
  29. *     c/o David J. DeWitt and Michael J. Carey
  30. *   Computer Sciences Department
  31. *   University of Wisconsin -- Madison
  32. *   Madison, WI 53706
  33. *
  34. *     or exodus@cs.wisc.edu
  35. *
  36. * In addition, the EXODUS Project Group requests that users grant the 
  37. * Computer Sciences Department rights to redistribute these changes.
  38. **********************************************************************/
  39. #ifdef __cplusplus
  40.  
  41. inline int operator==(const OID& o1, const OID& o2)
  42. {
  43.     return o1.diskAddr.unique == o2.diskAddr.unique &&
  44.            o1.diskAddr.slot == o2.diskAddr.slot &&
  45.            o1.diskAddr.page == o2.diskAddr.page &&
  46.            o1.diskAddr.volid == o2.diskAddr.volid;
  47. }
  48.  
  49.  
  50. inline int operator!=(const OID& o1, const OID& o2)
  51. {
  52.     return ! (o1 == o2);
  53. }
  54.  
  55.  
  56. inline int operator==(const PID& p1, const PID& p2)
  57. {
  58.     return p1.page == p2.page && p1.volid == p2.volid;
  59. }
  60.  
  61.  
  62.  
  63. inline int operator!=(const PID& p1, const PID& p2)
  64. {
  65.     return !(p1 == p2);
  66. }
  67.  
  68. #endif
  69. #endif /* _CC_MACRO_H_ */
  70.